/integration/:id/preview
curl --request POST \
--url https://api.tagdeliver.com/v1/integration/{id}/preview \
--header 'Content-Type: application/json' \
--data '
{
"platform_id": "123456789",
"settings": {
"publisher_own_domain": true,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": [
"example-aggregator.com",
"example-reader"
]
}
]
},
"start": "2026-10-06",
"end": "2026-10-12"
}
'import requests
url = "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload = {
"platform_id": "123456789",
"settings": {
"publisher_own_domain": True,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": ["example-aggregator.com", "example-reader"]
}
]
},
"start": "2026-10-06",
"end": "2026-10-12"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
platform_id: '123456789',
settings: {
publisher_own_domain: true,
traffic_filters: [
{
dimension: 'sessionSource',
match: 'contains',
values: ['example-aggregator.com', 'example-reader']
}
]
},
start: '2026-10-06',
end: '2026-10-12'
})
};
fetch('https://api.tagdeliver.com/v1/integration/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tagdeliver.com/v1/integration/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform_id' => '123456789',
'settings' => [
'publisher_own_domain' => true,
'traffic_filters' => [
[
'dimension' => 'sessionSource',
'match' => 'contains',
'values' => [
'example-aggregator.com',
'example-reader'
]
]
]
],
'start' => '2026-10-06',
'end' => '2026-10-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload := strings.NewReader("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tagdeliver.com/v1/integration/{id}/preview")
.header("Content-Type", "application/json")
.body("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/integration/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"columns": {
"before": "Before",
"after": "After",
"change": "Excluded"
},
"rows": [
{
"label": "Page views",
"before": 1250000,
"after": 1020000
},
{
"label": "Sessions",
"before": 910000,
"after": 700000
},
{
"label": "Users",
"before": 840000,
"after": 650000
}
],
"notes": [
"Only counting traffic on example.com (www. included)."
],
"list": {
"title": "Top matched excluded traffic (share of all page views):",
"empty": "No traffic in this period matches the filters you've set above.",
"total": 1250000,
"items": [
{
"label": "example-aggregator.com",
"value": 210000
},
{
"label": "example-reader",
"value": 1600
}
]
}
},
"success": true
}{
"message": "A numeric property ID is required",
"success": false
}{
"message": "User forbidden",
"success": false
}{
"message": "Not Found",
"success": false
}[IN PROGRESS] Integration
/integration/:id/preview
Preview how unsaved settings would change an integration’s figures for one mapped platform ID. Returns before/after totals; nothing is saved. Only works for modules that support previews (currently Google Analytics).
POST
/
v1
/
integration
/
{id}
/
preview
/integration/:id/preview
curl --request POST \
--url https://api.tagdeliver.com/v1/integration/{id}/preview \
--header 'Content-Type: application/json' \
--data '
{
"platform_id": "123456789",
"settings": {
"publisher_own_domain": true,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": [
"example-aggregator.com",
"example-reader"
]
}
]
},
"start": "2026-10-06",
"end": "2026-10-12"
}
'import requests
url = "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload = {
"platform_id": "123456789",
"settings": {
"publisher_own_domain": True,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": ["example-aggregator.com", "example-reader"]
}
]
},
"start": "2026-10-06",
"end": "2026-10-12"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
platform_id: '123456789',
settings: {
publisher_own_domain: true,
traffic_filters: [
{
dimension: 'sessionSource',
match: 'contains',
values: ['example-aggregator.com', 'example-reader']
}
]
},
start: '2026-10-06',
end: '2026-10-12'
})
};
fetch('https://api.tagdeliver.com/v1/integration/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tagdeliver.com/v1/integration/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform_id' => '123456789',
'settings' => [
'publisher_own_domain' => true,
'traffic_filters' => [
[
'dimension' => 'sessionSource',
'match' => 'contains',
'values' => [
'example-aggregator.com',
'example-reader'
]
]
]
],
'start' => '2026-10-06',
'end' => '2026-10-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload := strings.NewReader("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tagdeliver.com/v1/integration/{id}/preview")
.header("Content-Type", "application/json")
.body("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/integration/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"example-aggregator.com\",\n \"example-reader\"\n ]\n }\n ]\n },\n \"start\": \"2026-10-06\",\n \"end\": \"2026-10-12\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"columns": {
"before": "Before",
"after": "After",
"change": "Excluded"
},
"rows": [
{
"label": "Page views",
"before": 1250000,
"after": 1020000
},
{
"label": "Sessions",
"before": 910000,
"after": 700000
},
{
"label": "Users",
"before": 840000,
"after": 650000
}
],
"notes": [
"Only counting traffic on example.com (www. included)."
],
"list": {
"title": "Top matched excluded traffic (share of all page views):",
"empty": "No traffic in this period matches the filters you've set above.",
"total": 1250000,
"items": [
{
"label": "example-aggregator.com",
"value": 210000
},
{
"label": "example-reader",
"value": 1600
}
]
}
},
"success": true
}{
"message": "A numeric property ID is required",
"success": false
}{
"message": "User forbidden",
"success": false
}{
"message": "Not Found",
"success": false
}Path Parameters
Integration ID, Encoded (base-36)
Body
application/json
Was this page helpful?
⌘I